package com.bdqn.web;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.bdqn.web.bojo.User;

public class User5Servlet extends HttpServlet {

	@Override
	protected void service(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		req.setCharacterEncoding("utf-8");
		resp.setContentType("text/html;charset=utf-8");
		String userName=req.getParameter("userName");
		String password=req.getParameter("password");
		User user=new User();
		user.setUserName(userName);
		user.setPassword(password);
		HttpSession session =req.getSession();
		session.setAttribute("userName", user);
		resp.sendRedirect("email.jsp");
		
		
			}

}
